import calculator.Calculator;

import java.util.Objects;
import java.util.Scanner;

/**
 * @author ouweijian
 * @date 2023/2/11 17:31
 */
public class Main {

    public static void main(String[] args) {
        Calculator calculator = new Calculator();
        Scanner scanner = new Scanner(System.in);
        String input;
        while (!Objects.equals(input = scanner.next(), "EXIT")) {
            calculator.process(input);
        }
        System.out.println("EXIT");
    }
}
